<?php


abstract class BaseContratacionVariable extends BaseObject  implements Persistent {


	
	protected static $peer;

	
	protected $id;

	
	protected $nombre;

	
	protected $collContratacionContratoAVariables;

	
	private $lastContratacionContratoAVariableCriteria = null;

	
	protected $collContratacionModeloAVariables;

	
	private $lastContratacionModeloAVariableCriteria = null;

	
	protected $collContratacionOtroSiAVariables;

	
	private $lastContratacionOtroSiAVariableCriteria = null;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function __construct()
	{
		$this->applyDefaultValues();
	}

	
	public function applyDefaultValues()
	{
	}

	
	public function getId()
	{
		return $this->id;
	}

	
	public function getNombre()
	{
		return $this->nombre;
	}

	
	public function setId($v)
	{
		if ($v !== null) {
			$v = (string) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = ContratacionVariablePeer::ID;
		}

		return $this;
	} 
	
	public function setNombre($v)
	{
		if ($v !== null) {
			$v = (string) $v;
		}

		if ($this->nombre !== $v) {
			$this->nombre = $v;
			$this->modifiedColumns[] = ContratacionVariablePeer::NOMBRE;
		}

		return $this;
	} 
	
	public function hasOnlyDefaultValues()
	{
						if (array_diff($this->modifiedColumns, array())) {
				return false;
			}

				return true;
	} 
	
	public function hydrate($row, $startcol = 0, $rehydrate = false)
	{
		try {

			$this->id = ($row[$startcol + 0] !== null) ? (string) $row[$startcol + 0] : null;
			$this->nombre = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
			$this->resetModified();

			$this->setNew(false);

			if ($rehydrate) {
				$this->ensureConsistency();
			}

						return $startcol + 2; 
		} catch (Exception $e) {
			throw new PropelException("Error populating ContratacionVariable object", $e);
		}
	}

	
	public function ensureConsistency()
	{

	} 
	
	public function reload($deep = false, PropelPDO $con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("Cannot reload a deleted object.");
		}

		if ($this->isNew()) {
			throw new PropelException("Cannot reload an unsaved object.");
		}

		if ($con === null) {
			$con = Propel::getConnection(ContratacionVariablePeer::DATABASE_NAME, Propel::CONNECTION_READ);
		}

				
		$stmt = ContratacionVariablePeer::doSelectStmt($this->buildPkeyCriteria(), $con);
		$row = $stmt->fetch(PDO::FETCH_NUM);
		$stmt->closeCursor();
		if (!$row) {
			throw new PropelException('Cannot find matching row in the database to reload object values.');
		}
		$this->hydrate($row, 0, true); 
		if ($deep) {  
			$this->collContratacionContratoAVariables = null;
			$this->lastContratacionContratoAVariableCriteria = null;

			$this->collContratacionModeloAVariables = null;
			$this->lastContratacionModeloAVariableCriteria = null;

			$this->collContratacionOtroSiAVariables = null;
			$this->lastContratacionOtroSiAVariableCriteria = null;

		} 	}

	
	public function delete(PropelPDO $con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(ContratacionVariablePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
		}

		try {
			$con->beginTransaction();
			ContratacionVariablePeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save(PropelPDO $con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(ContratacionVariablePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
		}

		try {
		    if($this->validate())
		    {
    			$con->beginTransaction();
    			$affectedRows = $this->doSave($con);
    			$con->commit();
    			ContratacionVariablePeer::addInstanceToPool($this);
    			return true;
			}else
			{
			     
                 return false;
            }
		} catch (PropelException $e) {
			$con->rollback();
			
			
			ErrorLog::reportarError('errors', 'error',  $e->getMessage() );
			return false;
		}
	}

	
	protected function doSave(PropelPDO $con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = ContratacionVariablePeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setId($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += ContratacionVariablePeer::doUpdate($this, $con);
				}

				$this->resetModified(); 			}

			if ($this->collContratacionContratoAVariables !== null) {
				foreach ($this->collContratacionContratoAVariables as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collContratacionModeloAVariables !== null) {
				foreach ($this->collContratacionModeloAVariables as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collContratacionOtroSiAVariables !== null) {
				foreach ($this->collContratacionOtroSiAVariables as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			$this->alreadyInSave = false;

		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = ContratacionVariablePeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}


				if ($this->collContratacionContratoAVariables !== null) {
					foreach ($this->collContratacionContratoAVariables as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collContratacionModeloAVariables !== null) {
					foreach ($this->collContratacionModeloAVariables as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collContratacionOtroSiAVariables !== null) {
					foreach ($this->collContratacionOtroSiAVariables as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}


			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = ContratacionVariablePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getId();
				break;
			case 1:
				return $this->getNombre();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)
	{
		$keys = ContratacionVariablePeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getId(),
			$keys[1] => $this->getNombre(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = ContratacionVariablePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setNombre($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = ContratacionVariablePeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setNombre($arr[$keys[1]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);

		if ($this->isColumnModified(ContratacionVariablePeer::ID)) $criteria->add(ContratacionVariablePeer::ID, $this->id);
		if ($this->isColumnModified(ContratacionVariablePeer::NOMBRE)) $criteria->add(ContratacionVariablePeer::NOMBRE, $this->nombre);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);

		$criteria->add(ContratacionVariablePeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setNombre($this->nombre);


		if ($deepCopy) {
									$copyObj->setNew(false);

			foreach ($this->getContratacionContratoAVariables() as $relObj) {
				if ($relObj !== $this) {  					$copyObj->addContratacionContratoAVariable($relObj->copy($deepCopy));
				}
			}

			foreach ($this->getContratacionModeloAVariables() as $relObj) {
				if ($relObj !== $this) {  					$copyObj->addContratacionModeloAVariable($relObj->copy($deepCopy));
				}
			}

			foreach ($this->getContratacionOtroSiAVariables() as $relObj) {
				if ($relObj !== $this) {  					$copyObj->addContratacionOtroSiAVariable($relObj->copy($deepCopy));
				}
			}

		} 

		$copyObj->setNew(true);

		$copyObj->setId(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new ContratacionVariablePeer();
		}
		return self::$peer;
	}

	
	public function clearContratacionContratoAVariables()
	{
		$this->collContratacionContratoAVariables = null; 	}

	
	public function getContratacionContratoAVariables($criteria = null, PropelPDO $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collContratacionContratoAVariables === null) {
			if ($this->isNew()) {
			   $this->collContratacionContratoAVariables = array();
			} else {

				$criteria->add(ContratacionContratoAVariablePeer::VARIABLE_ID, $this->getId());

				ContratacionContratoAVariablePeer::addSelectColumns($criteria);
				$this->collContratacionContratoAVariables = ContratacionContratoAVariablePeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(ContratacionContratoAVariablePeer::VARIABLE_ID, $this->getId());

				ContratacionContratoAVariablePeer::addSelectColumns($criteria);
				if (!isset($this->lastContratacionContratoAVariableCriteria) || !$this->lastContratacionContratoAVariableCriteria->equals($criteria)) {
					$this->collContratacionContratoAVariables = ContratacionContratoAVariablePeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastContratacionContratoAVariableCriteria = $criteria;
		return $this->collContratacionContratoAVariables;
	}

	
	public function countContratacionContratoAVariables(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		} else {
			$criteria = clone $criteria;
		}

		if ($distinct) {
			$criteria->setDistinct();
		}

		$count = null;

		if ($this->collContratacionContratoAVariables === null) {
			if ($this->isNew()) {
				$count = 0;
			} else {

				$criteria->add(ContratacionContratoAVariablePeer::VARIABLE_ID, $this->getId());

				$count = ContratacionContratoAVariablePeer::doCount($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(ContratacionContratoAVariablePeer::VARIABLE_ID, $this->getId());

				if (!isset($this->lastContratacionContratoAVariableCriteria) || !$this->lastContratacionContratoAVariableCriteria->equals($criteria)) {
					$count = ContratacionContratoAVariablePeer::doCount($criteria, $con);
				} else {
					$count = count($this->collContratacionContratoAVariables);
				}
			} else {
				$count = count($this->collContratacionContratoAVariables);
			}
		}
		$this->lastContratacionContratoAVariableCriteria = $criteria;
		return $count;
	}

	
	public function addContratacionContratoAVariable(ContratacionContratoAVariable $l)
	{
		if ($this->collContratacionContratoAVariables === null) {
			$this->collContratacionContratoAVariables = array();
		}
		if (!in_array($l, $this->collContratacionContratoAVariables, true)) { 			array_push($this->collContratacionContratoAVariables, $l);
			$l->setContratacionVariable($this);
		}
	}


	
	public function getContratacionContratoAVariablesJoinContratacionContrato($criteria = null, $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collContratacionContratoAVariables === null) {
			if ($this->isNew()) {
				$this->collContratacionContratoAVariables = array();
			} else {

				$criteria->add(ContratacionContratoAVariablePeer::VARIABLE_ID, $this->getId());

				$this->collContratacionContratoAVariables = ContratacionContratoAVariablePeer::doSelectJoinContratacionContrato($criteria, $con);
			}
		} else {
									
			$criteria->add(ContratacionContratoAVariablePeer::VARIABLE_ID, $this->getId());

			if (!isset($this->lastContratacionContratoAVariableCriteria) || !$this->lastContratacionContratoAVariableCriteria->equals($criteria)) {
				$this->collContratacionContratoAVariables = ContratacionContratoAVariablePeer::doSelectJoinContratacionContrato($criteria, $con);
			}
		}
		$this->lastContratacionContratoAVariableCriteria = $criteria;

		return $this->collContratacionContratoAVariables;
	}

	
	public function clearContratacionModeloAVariables()
	{
		$this->collContratacionModeloAVariables = null; 	}

	
	public function getContratacionModeloAVariables($criteria = null, PropelPDO $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collContratacionModeloAVariables === null) {
			if ($this->isNew()) {
			   $this->collContratacionModeloAVariables = array();
			} else {

				$criteria->add(ContratacionModeloAVariablePeer::VARIABLE_ID, $this->getId());

				ContratacionModeloAVariablePeer::addSelectColumns($criteria);
				$this->collContratacionModeloAVariables = ContratacionModeloAVariablePeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(ContratacionModeloAVariablePeer::VARIABLE_ID, $this->getId());

				ContratacionModeloAVariablePeer::addSelectColumns($criteria);
				if (!isset($this->lastContratacionModeloAVariableCriteria) || !$this->lastContratacionModeloAVariableCriteria->equals($criteria)) {
					$this->collContratacionModeloAVariables = ContratacionModeloAVariablePeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastContratacionModeloAVariableCriteria = $criteria;
		return $this->collContratacionModeloAVariables;
	}

	
	public function countContratacionModeloAVariables(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		} else {
			$criteria = clone $criteria;
		}

		if ($distinct) {
			$criteria->setDistinct();
		}

		$count = null;

		if ($this->collContratacionModeloAVariables === null) {
			if ($this->isNew()) {
				$count = 0;
			} else {

				$criteria->add(ContratacionModeloAVariablePeer::VARIABLE_ID, $this->getId());

				$count = ContratacionModeloAVariablePeer::doCount($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(ContratacionModeloAVariablePeer::VARIABLE_ID, $this->getId());

				if (!isset($this->lastContratacionModeloAVariableCriteria) || !$this->lastContratacionModeloAVariableCriteria->equals($criteria)) {
					$count = ContratacionModeloAVariablePeer::doCount($criteria, $con);
				} else {
					$count = count($this->collContratacionModeloAVariables);
				}
			} else {
				$count = count($this->collContratacionModeloAVariables);
			}
		}
		$this->lastContratacionModeloAVariableCriteria = $criteria;
		return $count;
	}

	
	public function addContratacionModeloAVariable(ContratacionModeloAVariable $l)
	{
		if ($this->collContratacionModeloAVariables === null) {
			$this->collContratacionModeloAVariables = array();
		}
		if (!in_array($l, $this->collContratacionModeloAVariables, true)) { 			array_push($this->collContratacionModeloAVariables, $l);
			$l->setContratacionVariable($this);
		}
	}


	
	public function getContratacionModeloAVariablesJoinContratacionModelo($criteria = null, $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collContratacionModeloAVariables === null) {
			if ($this->isNew()) {
				$this->collContratacionModeloAVariables = array();
			} else {

				$criteria->add(ContratacionModeloAVariablePeer::VARIABLE_ID, $this->getId());

				$this->collContratacionModeloAVariables = ContratacionModeloAVariablePeer::doSelectJoinContratacionModelo($criteria, $con);
			}
		} else {
									
			$criteria->add(ContratacionModeloAVariablePeer::VARIABLE_ID, $this->getId());

			if (!isset($this->lastContratacionModeloAVariableCriteria) || !$this->lastContratacionModeloAVariableCriteria->equals($criteria)) {
				$this->collContratacionModeloAVariables = ContratacionModeloAVariablePeer::doSelectJoinContratacionModelo($criteria, $con);
			}
		}
		$this->lastContratacionModeloAVariableCriteria = $criteria;

		return $this->collContratacionModeloAVariables;
	}

	
	public function clearContratacionOtroSiAVariables()
	{
		$this->collContratacionOtroSiAVariables = null; 	}

	
	public function getContratacionOtroSiAVariables($criteria = null, PropelPDO $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collContratacionOtroSiAVariables === null) {
			if ($this->isNew()) {
			   $this->collContratacionOtroSiAVariables = array();
			} else {

				$criteria->add(ContratacionOtroSiAVariablePeer::VARIABLE_ID, $this->getId());

				ContratacionOtroSiAVariablePeer::addSelectColumns($criteria);
				$this->collContratacionOtroSiAVariables = ContratacionOtroSiAVariablePeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(ContratacionOtroSiAVariablePeer::VARIABLE_ID, $this->getId());

				ContratacionOtroSiAVariablePeer::addSelectColumns($criteria);
				if (!isset($this->lastContratacionOtroSiAVariableCriteria) || !$this->lastContratacionOtroSiAVariableCriteria->equals($criteria)) {
					$this->collContratacionOtroSiAVariables = ContratacionOtroSiAVariablePeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastContratacionOtroSiAVariableCriteria = $criteria;
		return $this->collContratacionOtroSiAVariables;
	}

	
	public function countContratacionOtroSiAVariables(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		} else {
			$criteria = clone $criteria;
		}

		if ($distinct) {
			$criteria->setDistinct();
		}

		$count = null;

		if ($this->collContratacionOtroSiAVariables === null) {
			if ($this->isNew()) {
				$count = 0;
			} else {

				$criteria->add(ContratacionOtroSiAVariablePeer::VARIABLE_ID, $this->getId());

				$count = ContratacionOtroSiAVariablePeer::doCount($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(ContratacionOtroSiAVariablePeer::VARIABLE_ID, $this->getId());

				if (!isset($this->lastContratacionOtroSiAVariableCriteria) || !$this->lastContratacionOtroSiAVariableCriteria->equals($criteria)) {
					$count = ContratacionOtroSiAVariablePeer::doCount($criteria, $con);
				} else {
					$count = count($this->collContratacionOtroSiAVariables);
				}
			} else {
				$count = count($this->collContratacionOtroSiAVariables);
			}
		}
		$this->lastContratacionOtroSiAVariableCriteria = $criteria;
		return $count;
	}

	
	public function addContratacionOtroSiAVariable(ContratacionOtroSiAVariable $l)
	{
		if ($this->collContratacionOtroSiAVariables === null) {
			$this->collContratacionOtroSiAVariables = array();
		}
		if (!in_array($l, $this->collContratacionOtroSiAVariables, true)) { 			array_push($this->collContratacionOtroSiAVariables, $l);
			$l->setContratacionVariable($this);
		}
	}


	
	public function getContratacionOtroSiAVariablesJoinContratacionOtroSi($criteria = null, $con = null)
	{
		
		if ($criteria === null) {
			$criteria = new Criteria(ContratacionVariablePeer::DATABASE_NAME);
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collContratacionOtroSiAVariables === null) {
			if ($this->isNew()) {
				$this->collContratacionOtroSiAVariables = array();
			} else {

				$criteria->add(ContratacionOtroSiAVariablePeer::VARIABLE_ID, $this->getId());

				$this->collContratacionOtroSiAVariables = ContratacionOtroSiAVariablePeer::doSelectJoinContratacionOtroSi($criteria, $con);
			}
		} else {
									
			$criteria->add(ContratacionOtroSiAVariablePeer::VARIABLE_ID, $this->getId());

			if (!isset($this->lastContratacionOtroSiAVariableCriteria) || !$this->lastContratacionOtroSiAVariableCriteria->equals($criteria)) {
				$this->collContratacionOtroSiAVariables = ContratacionOtroSiAVariablePeer::doSelectJoinContratacionOtroSi($criteria, $con);
			}
		}
		$this->lastContratacionOtroSiAVariableCriteria = $criteria;

		return $this->collContratacionOtroSiAVariables;
	}

	
	public function clearAllReferences($deep = false)
	{
		if ($deep) {
			foreach($this->collContratacionContratoAVariables as $o) {
				$o->clearAllReferences($deep);
			}
			foreach($this->collContratacionModeloAVariables as $o) {
				$o->clearAllReferences($deep);
			}
			foreach($this->collContratacionOtroSiAVariables as $o) {
				$o->clearAllReferences($deep);
			}
		} 
		$this->collContratacionContratoAVariables = null;
		$this->collContratacionModeloAVariables = null;
		$this->collContratacionOtroSiAVariables = null;
	}

} 